package com.lpit.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 反馈表
 * @TableName feedback
 */
@TableName(value ="feedback")
@Data
public class Feedback implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 反馈人
     */
    private Integer userId;

    /**
     * 反馈人联系方式
     */
    private String feedbackContactWay;

    /**
     * 反馈的内容
     */
    private String feedbackContext;

    /**
     * 反馈的目标（评论，作品，用户）
     */
    private String feedbackStatus;

    /**
     * 反馈的目标id
     */
    private Integer feedbackStatusId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Feedback other = (Feedback) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getFeedbackContactWay() == null ? other.getFeedbackContactWay() == null : this.getFeedbackContactWay().equals(other.getFeedbackContactWay()))
            && (this.getFeedbackContext() == null ? other.getFeedbackContext() == null : this.getFeedbackContext().equals(other.getFeedbackContext()))
            && (this.getFeedbackStatus() == null ? other.getFeedbackStatus() == null : this.getFeedbackStatus().equals(other.getFeedbackStatus()))
            && (this.getFeedbackStatusId() == null ? other.getFeedbackStatusId() == null : this.getFeedbackStatusId().equals(other.getFeedbackStatusId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getFeedbackContactWay() == null) ? 0 : getFeedbackContactWay().hashCode());
        result = prime * result + ((getFeedbackContext() == null) ? 0 : getFeedbackContext().hashCode());
        result = prime * result + ((getFeedbackStatus() == null) ? 0 : getFeedbackStatus().hashCode());
        result = prime * result + ((getFeedbackStatusId() == null) ? 0 : getFeedbackStatusId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", feedbackContactWay=").append(feedbackContactWay);
        sb.append(", feedbackContext=").append(feedbackContext);
        sb.append(", feedbackStatus=").append(feedbackStatus);
        sb.append(", feedbackStatusId=").append(feedbackStatusId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}